
/**
 * Created by Kylin on 2016/12/6.
 */
import React, {Component} from 'react';

export default class Content extends Component{
  showPreview(){
    if(Array.isArray(this.props.children)){
      return (
        <div className="Z_content">
          <div className="Z_panel-body-backgound">
            <div className="Z_panel-body">
              {
                this.props.children[1]
              }
            </div>
          </div>
        </div>
      )
    }
  }
  render() {
    return (
      <div className="Z_slideIn">
        <div className="page slideIn">
          <div className="Z_content_code">
            {
              Array.isArray(this.props.children) ? this.props.children[0]: this.props.children
            }
          </div>
        </div>
        {
          this.showPreview()
        }

      </div>
    )
  }
}